package net.lukecloud.xile.net;

import net.lukecloud.xile.model.Account;
import net.lukecloud.xile.model.Device;
import net.lukecloud.xile.model.Token;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;


public interface ApiService {

    @Headers({"Content-type:application/json;charset=UTF-8"})
    @POST("api/authenticate")
    Call<Token.Res>  authenticate(@Body Token.Req req);

    @GET("api/account")
    Call<Account>  selfAccount();

    @GET("api/devices")
    Call<List<Device>>  getDevices();
    @GET("api/devices/{id}/echo")
    Call<Void>  deviceEcho(@Path("id") long id);

    @GET("api/devices/{id}")
    Call<List<Device>>  getDevice(@Path("id") long id);
}
